package com.ruoyi.system.service.aid.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.aid.AidInventoryMapper;
import com.ruoyi.system.domain.aid.AidInventory;
import com.ruoyi.system.service.aid.IAidInventoryService;

/**
 * 库存管理Service业务层处理
 */
@Service
public class AidInventoryServiceImpl implements IAidInventoryService 
{
    @Autowired
    private AidInventoryMapper inventoryMapper;

    /**
     * 查询库存列表
     */
    @Override
    public List<AidInventory> selectInventoryList(AidInventory inventory)
    {
        return inventoryMapper.selectInventoryList(inventory);
    }

    /**
     * 查询库存详细信息
     */
    @Override
    public AidInventory selectInventoryById(Long inventoryId)
    {
        return inventoryMapper.selectInventoryById(inventoryId);
    }

    /**
     * 新增库存
     */
    @Override
    public int insertInventory(AidInventory inventory)
    {
        return inventoryMapper.insertInventory(inventory);
    }

    /**
     * 修改库存
     */
    @Override
    public int updateInventory(AidInventory inventory)
    {
        return inventoryMapper.updateInventory(inventory);
    }

    /**
     * 批量删除库存
     */
    @Override
    public int deleteInventoryByIds(Long[] inventoryIds)
    {
        return inventoryMapper.deleteInventoryByIds(inventoryIds);
    }

    /**
     * 删除库存信息
     */
    @Override
    public int deleteInventoryById(Long inventoryId)
    {
        return inventoryMapper.deleteInventoryById(inventoryId);
    }

    /**
     * 根据仓库ID查询库存
     */
    @Override
    public List<AidInventory> selectInventoryByWarehouseId(Long warehouseId)
    {
        return inventoryMapper.selectInventoryByWarehouseId(warehouseId);
    }

    /**
     * 根据物资名称查询库存
     */
    @Override
    public List<AidInventory> selectInventoryByMaterialName(String materialName)
    {
        return inventoryMapper.selectInventoryByMaterialName(materialName);
    }
} 